package com.chenliang.sc;

import com.chenliang.sc.filter.MyFilter01;
import com.chenliang.sc.po.User;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @program: springcase
 * @description:
 * @author: 陈亮
 * @create: 2022-06-09 17:38
 */
@SpringBootApplication
@ServletComponentScan
@MapperScan("com.chenliang.sc.mapper")
@EnableTransactionManagement
public class ScApplication {

    public static void main(String[] args) {
        /**
         * 分析ApplicationContext和BeanFactory
         * applicationContext继承自beanFactory,不能简单的看作applicationContext是beanFactory的实现类
         * 而是applicationContext内部持有一个beanFactory实例defaultListAbleBeanFactory. 
         * applicationContext关于beanFactory相关的操作都是委托给这个实例处理的
         */
        ConfigurableApplicationContext context = SpringApplication.run(ScApplication.class, args);
    }
}
